using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;

namespace CinemaLib
{
    /// <summary>
    /// Properties of Reservations sent via WCF.
    /// </summary>
    [DataContract]
    public class Reservation
    {
        [DataMember]
        public int ID { get; private set; }
        [DataMember]
        public bool IsPaid { get; set; }
        [DataMember]
        public Show BookedShow { get; set; }
        [DataMember]
        public User BookedUser { get; set; }
        [DataMember]
        public List<Ticket> Tickets { get; set; }

        public Reservation(int _id, bool _ispaid, Show _show)
        {
            ID = _id;
            IsPaid = _ispaid;
            BookedShow = _show;
            Tickets = new List<Ticket>();
        }

        public Reservation(bool _ispaid, Show _show, User _user, List<Ticket> _tickets)
        {
            IsPaid = _ispaid;
            BookedShow = _show;
            BookedUser = _user;
            Tickets = _tickets;
        }

        public Reservation(int _id, bool _ispaid, Show _show, User _user, List<Ticket> _tickets)
        {
            ID = _id;
            IsPaid = _ispaid;
            BookedShow = _show;
            BookedUser = _user;
            Tickets = _tickets;
        }
    }
}
